package bit.action;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import bit.dao.BoardDAO;
import bit.dao.BoardDTO;

public class BoardListAction implements Action {

	@Override
	public ActionForward execute(HttpServletRequest req, HttpServletResponse res)
			throws ServletException, IOException {
		BoardDAO dao = new BoardDAO();
		List<BoardDTO> list = dao.boardList();
		req.setAttribute("list", list);
		ActionForward forward = new ActionForward();
		forward.setPath("/board/boardlist.jsp");
		forward.setRedirect(false);
		return forward;
	}
}
